home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / lispref.info-37.z / lispref.info-37
Encoding:
GNU Info File  |  1998-05-21  |  46.3 KB  |  1,147 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo version
  2. 1.68 from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995 XEmacs Lisp
  12. Reference Manual (for 19.14 and 20.0) v3.1, March 1996 XEmacs Lisp
  13. Reference Manual (for 19.15 and 20.1, 20.2) v3.2, April, May 1997
  14.  
  15.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  16. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  17. Copyright (C) 1995, 1996 Ben Wing.
  18.  
  19.    Permission is granted to make and distribute verbatim copies of this
  20. manual provided the copyright notice and this permission notice are
  21. preserved on all copies.
  22.  
  23.    Permission is granted to copy and distribute modified versions of
  24. this manual under the conditions for verbatim copying, provided that the
  25. entire resulting derived work is distributed under the terms of a
  26. permission notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that this permission notice may be stated in a
  31. translation approved by the Foundation.
  32.  
  33.    Permission is granted to copy and distribute modified versions of
  34. this manual under the conditions for verbatim copying, provided also
  35. that the section entitled "GNU General Public License" is included
  36. exactly as in the original, and provided that the entire resulting
  37. derived work is distributed under the terms of a permission notice
  38. identical to this one.
  39.  
  40.    Permission is granted to copy and distribute translations of this
  41. manual into another language, under the above conditions for modified
  42. versions, except that the section entitled "GNU General Public License"
  43. may be included in a translation approved by the Free Software
  44. Foundation instead of in the original English.
  45.  
  46. 
  47. File: lispref.info,  Node: Filter Functions,  Next: Accepting Output,  Prev: Process Buffers,  Up: Output from Processes
  48.  
  49. Process Filter Functions
  50. ------------------------
  51.  
  52.    A process "filter function" is a function that receives the standard
  53. output from the associated process.  If a process has a filter, then
  54. *all* output from that process is passed to the filter.  The process
  55. buffer is used directly for output from the process only when there is
  56. no filter.
  57.  
  58.    A filter function must accept two arguments: the associated process
  59. and a string, which is the output.  The function is then free to do
  60. whatever it chooses with the output.
  61.  
  62.    A filter function runs only while XEmacs is waiting (e.g., for
  63. terminal input, or for time to elapse, or for process output).  This
  64. avoids the timing errors that could result from running filters at
  65. random places in the middle of other Lisp programs.  You may explicitly
  66. cause Emacs to wait, so that filter functions will run, by calling
  67. `sit-for' or `sleep-for' (*note Waiting::.), or `accept-process-output'
  68. (*note Accepting Output::.).  Emacs is also waiting when the command
  69. loop is reading input.
  70.  
  71.    Quitting is normally inhibited within a filter function--otherwise,
  72. the effect of typing `C-g' at command level or to quit a user command
  73. would be unpredictable.  If you want to permit quitting inside a filter
  74. function, bind `inhibit-quit' to `nil'.  *Note Quitting::.
  75.  
  76.    If an error happens during execution of a filter function, it is
  77. caught automatically, so that it doesn't stop the execution of whatever
  78. program was running when the filter function was started.  However, if
  79. `debug-on-error' is non-`nil', the error-catching is turned off.  This
  80. makes it possible to use the Lisp debugger to debug the filter
  81. function.  *Note Debugger::.
  82.  
  83.    Many filter functions sometimes or always insert the text in the
  84. process's buffer, mimicking the actions of XEmacs when there is no
  85. filter.  Such filter functions need to use `set-buffer' in order to be
  86. sure to insert in that buffer.  To avoid setting the current buffer
  87. semipermanently, these filter functions must use `unwind-protect' to
  88. make sure to restore the previous current buffer.  They should also
  89. update the process marker, and in some cases update the value of point.
  90. Here is how to do these things:
  91.  
  92.      (defun ordinary-insertion-filter (proc string)
  93.        (let ((old-buffer (current-buffer)))
  94.          (unwind-protect
  95.              (let (moving)
  96.                (set-buffer (process-buffer proc))
  97.                (setq moving (= (point) (process-mark proc)))
  98.  
  99.      (save-excursion
  100.                  ;; Insert the text, moving the process-marker.
  101.                  (goto-char (process-mark proc))
  102.                  (insert string)
  103.                  (set-marker (process-mark proc) (point)))
  104.                (if moving (goto-char (process-mark proc))))
  105.            (set-buffer old-buffer))))
  106.  
  107. The reason to use an explicit `unwind-protect' rather than letting
  108. `save-excursion' restore the current buffer is so as to preserve the
  109. change in point made by `goto-char'.
  110.  
  111.    To make the filter force the process buffer to be visible whenever
  112. new text arrives, insert the following line just before the
  113. `unwind-protect':
  114.  
  115.      (display-buffer (process-buffer proc))
  116.  
  117.    To force point to move to the end of the new output no matter where
  118. it was previously, eliminate the variable `moving' and call `goto-char'
  119. unconditionally.
  120.  
  121.    In earlier Emacs versions, every filter function that did regexp
  122. searching or matching had to explicitly save and restore the match data.
  123. Now Emacs does this automatically; filter functions never need to do it
  124. explicitly.  *Note Match Data::.
  125.  
  126.    A filter function that writes the output into the buffer of the
  127. process should check whether the buffer is still alive.  If it tries to
  128. insert into a dead buffer, it will get an error.  If the buffer is dead,
  129. `(buffer-name (process-buffer PROCESS))' returns `nil'.
  130.  
  131.    The output to the function may come in chunks of any size.  A program
  132. that produces the same output twice in a row may send it as one batch
  133. of 200 characters one time, and five batches of 40 characters the next.
  134.  
  135.  - Function: set-process-filter PROCESS FILTER
  136.      This function gives PROCESS the filter function FILTER.  If FILTER
  137.      is `nil', then the process will have no filter.  If FILTER is `t',
  138.      then no output from the process will be accepted until the filter
  139.      is changed. (Output received during this time is not discarded,
  140.      but is queued, and will be processed as soon as the filter is
  141.      changed.)
  142.  
  143.  - Function: process-filter PROCESS
  144.      This function returns the filter function of PROCESS, or `nil' if
  145.      it has none.  `t' means that output processing has been stopped.
  146.  
  147.    Here is an example of use of a filter function:
  148.  
  149.      (defun keep-output (process output)
  150.         (setq kept (cons output kept)))
  151.           => keep-output
  152.  
  153.      (setq kept nil)
  154.           => nil
  155.  
  156.      (set-process-filter (get-process "shell") 'keep-output)
  157.           => keep-output
  158.  
  159.      (process-send-string "shell" "ls ~/other\n")
  160.           => nil
  161.      kept
  162.           => ("lewis@slug[8] % "
  163.  
  164.      "FINAL-W87-SHORT.MSS    backup.otl              kolstad.mss~
  165.      address.txt             backup.psf              kolstad.psf
  166.      backup.bib~             david.mss               resume-Dec-86.mss~
  167.      backup.err              david.psf               resume-Dec.psf
  168.      backup.mss              dland                   syllabus.mss
  169.      "
  170.      "#backups.mss#          backup.mss~             kolstad.mss
  171.      ")
  172.  
  173. 
  174. File: lispref.info,  Node: Accepting Output,  Prev: Filter Functions,  Up: Output from Processes
  175.  
  176. Accepting Output from Processes
  177. -------------------------------
  178.  
  179.    Output from asynchronous subprocesses normally arrives only while
  180. XEmacs is waiting for some sort of external event, such as elapsed time
  181. or terminal input.  Occasionally it is useful in a Lisp program to
  182. explicitly permit output to arrive at a specific point, or even to wait
  183. until output arrives from a process.
  184.  
  185.  - Function: accept-process-output &optional PROCESS SECONDS MILLISEC
  186.      This function allows XEmacs to read pending output from processes.
  187.      The output is inserted in the associated buffers or given to
  188.      their filter functions.  If PROCESS is non-`nil' then this
  189.      function does not return until some output has been received from
  190.      PROCESS.
  191.  
  192.      The arguments SECONDS and MILLISEC let you specify timeout
  193.      periods.  The former specifies a period measured in seconds and the
  194.      latter specifies one measured in milliseconds.  The two time
  195.      periods thus specified are added together, and
  196.      `accept-process-output' returns after that much time whether or
  197.      not there has been any subprocess output.  Note that SECONDS is
  198.      allowed to be a floating-point number; thus, there is no need to
  199.      ever use MILLISEC. (It is retained for compatibility purposes.)
  200.  
  201.      The function `accept-process-output' returns non-`nil' if it did
  202.      get some output, or `nil' if the timeout expired before output
  203.      arrived.
  204.  
  205. 
  206. File: lispref.info,  Node: Sentinels,  Next: Process Window Size,  Prev: Output from Processes,  Up: Processes
  207.  
  208. Sentinels: Detecting Process Status Changes
  209. ===========================================
  210.  
  211.    A "process sentinel" is a function that is called whenever the
  212. associated process changes status for any reason, including signals
  213. (whether sent by XEmacs or caused by the process's own actions) that
  214. terminate, stop, or continue the process.  The process sentinel is also
  215. called if the process exits.  The sentinel receives two arguments: the
  216. process for which the event occurred, and a string describing the type
  217. of event.
  218.  
  219.    The string describing the event looks like one of the following:
  220.  
  221.    * `"finished\n"'.
  222.  
  223.    * `"exited abnormally with code EXITCODE\n"'.
  224.  
  225.    * `"NAME-OF-SIGNAL\n"'.
  226.  
  227.    * `"NAME-OF-SIGNAL (core dumped)\n"'.
  228.  
  229.    A sentinel runs only while XEmacs is waiting (e.g., for terminal
  230. input, or for time to elapse, or for process output).  This avoids the
  231. timing errors that could result from running them at random places in
  232. the middle of other Lisp programs.  A program can wait, so that
  233. sentinels will run, by calling `sit-for' or `sleep-for' (*note
  234. Waiting::.), or `accept-process-output' (*note Accepting Output::.).
  235. Emacs is also waiting when the command loop is reading input.
  236.  
  237.    Quitting is normally inhibited within a sentinel--otherwise, the
  238. effect of typing `C-g' at command level or to quit a user command would
  239. be unpredictable.  If you want to permit quitting inside a sentinel,
  240. bind `inhibit-quit' to `nil'.  *Note Quitting::.
  241.  
  242.    A sentinel that writes the output into the buffer of the process
  243. should check whether the buffer is still alive.  If it tries to insert
  244. into a dead buffer, it will get an error.  If the buffer is dead,
  245. `(buffer-name (process-buffer PROCESS))' returns `nil'.
  246.  
  247.    If an error happens during execution of a sentinel, it is caught
  248. automatically, so that it doesn't stop the execution of whatever
  249. programs was running when the sentinel was started.  However, if
  250. `debug-on-error' is non-`nil', the error-catching is turned off.  This
  251. makes it possible to use the Lisp debugger to debug the sentinel.
  252. *Note Debugger::.
  253.  
  254.    In earlier Emacs versions, every sentinel that did regexp searching
  255. or matching had to explicitly save and restore the match data.  Now
  256. Emacs does this automatically; sentinels never need to do it explicitly.
  257. *Note Match Data::.
  258.  
  259.  - Function: set-process-sentinel PROCESS SENTINEL
  260.      This function associates SENTINEL with PROCESS.  If SENTINEL is
  261.      `nil', then the process will have no sentinel.  The default
  262.      behavior when there is no sentinel is to insert a message in the
  263.      process's buffer when the process status changes.
  264.  
  265.           (defun msg-me (process event)
  266.              (princ
  267.                (format "Process: %s had the event `%s'" process event)))
  268.           (set-process-sentinel (get-process "shell") 'msg-me)
  269.                => msg-me
  270.  
  271.           (kill-process (get-process "shell"))
  272.                -| Process: #<process shell> had the event `killed'
  273.                => #<process shell>
  274.  
  275.  - Function: process-sentinel PROCESS
  276.      This function returns the sentinel of PROCESS, or `nil' if it has
  277.      none.
  278.  
  279.  - Function: waiting-for-user-input-p
  280.      While a sentinel or filter function is running, this function
  281.      returns non-`nil' if XEmacs was waiting for keyboard input from
  282.      the user at the time the sentinel or filter function was called,
  283.      `nil' if it was not.
  284.  
  285. 
  286. File: lispref.info,  Node: Process Window Size,  Next: Transaction Queues,  Prev: Sentinels,  Up: Processes
  287.  
  288. Process Window Size
  289. ===================
  290.  
  291.  - Function: set-process-window-size PROCESS HEIGHT WIDTH
  292.      This function tells PROCESS that its logical window size is HEIGHT
  293.      by WIDTH characters.  This is principally useful with pty's.
  294.  
  295. 
  296. File: lispref.info,  Node: Transaction Queues,  Next: Network,  Prev: Process Window Size,  Up: Processes
  297.  
  298. Transaction Queues
  299. ==================
  300.  
  301.    You can use a "transaction queue" for more convenient communication
  302. with subprocesses using transactions.  First use `tq-create' to create
  303. a transaction queue communicating with a specified process.  Then you
  304. can call `tq-enqueue' to send a transaction.
  305.  
  306.  - Function: tq-create PROCESS
  307.      This function creates and returns a transaction queue
  308.      communicating with PROCESS.  The argument PROCESS should be a
  309.      subprocess capable of sending and receiving streams of bytes.  It
  310.      may be a child process, or it may be a TCP connection to a server,
  311.      possibly on another machine.
  312.  
  313.  - Function: tq-enqueue QUEUE QUESTION REGEXP CLOSURE FN
  314.      This function sends a transaction to queue QUEUE.  Specifying the
  315.      queue has the effect of specifying the subprocess to talk to.
  316.  
  317.      The argument QUESTION is the outgoing message that starts the
  318.      transaction.  The argument FN is the function to call when the
  319.      corresponding answer comes back; it is called with two arguments:
  320.      CLOSURE, and the answer received.
  321.  
  322.      The argument REGEXP is a regular expression that should match the
  323.      entire answer, but nothing less; that's how `tq-enqueue' determines
  324.      where the answer ends.
  325.  
  326.      The return value of `tq-enqueue' itself is not meaningful.
  327.  
  328.  - Function: tq-close QUEUE
  329.      Shut down transaction queue QUEUE, waiting for all pending
  330.      transactions to complete, and then terminate the connection or
  331.      child process.
  332.  
  333.    Transaction queues are implemented by means of a filter function.
  334. *Note Filter Functions::.
  335.  
  336. 
  337. File: lispref.info,  Node: Network,  Prev: Transaction Queues,  Up: Processes
  338.  
  339. Network Connections
  340. ===================
  341.  
  342.    XEmacs Lisp programs can open TCP network connections to other
  343. processes on the same machine or other machines.  A network connection
  344. is handled by Lisp much like a subprocess, and is represented by a
  345. process object.  However, the process you are communicating with is not
  346. a child of the XEmacs process, so you can't kill it or send it signals.
  347. All you can do is send and receive data.  `delete-process' closes the
  348. connection, but does not kill the process at the other end; that
  349. process must decide what to do about closure of the connection.
  350.  
  351.    You can distinguish process objects representing network connections
  352. from those representing subprocesses with the `process-status'
  353. function.  It always returns either `open' or `closed' for a network
  354. connection, and it never returns either of those values for a real
  355. subprocess.  *Note Process Information::.
  356.  
  357.  - Function: open-network-stream NAME BUFFER-OR-NAME HOST SERVICE
  358.      This function opens a TCP connection for a service to a host.  It
  359.      returns a process object to represent the connection.
  360.  
  361.      The NAME argument specifies the name for the process object.  It
  362.      is modified as necessary to make it unique.
  363.  
  364.      The BUFFER-OR-NAME argument is the buffer to associate with the
  365.      connection.  Output from the connection is inserted in the buffer,
  366.      unless you specify a filter function to handle the output.  If
  367.      BUFFER-OR-NAME is `nil', it means that the connection is not
  368.      associated with any buffer.
  369.  
  370.      The arguments HOST and SERVICE specify where to connect to; HOST
  371.      is the host name or IP address (a string), and SERVICE is the name
  372.      of a defined network service (a string) or a port number (an
  373.      integer).
  374.  
  375. 
  376. File: lispref.info,  Node: System Interface,  Next: X-Windows,  Prev: Processes,  Up: Top
  377.  
  378. Operating System Interface
  379. **************************
  380.  
  381.    This chapter is about starting and getting out of Emacs, access to
  382. values in the operating system environment, and terminal input, output,
  383. and flow control.
  384.  
  385.    *Note Building XEmacs::, for related information.  See also *Note
  386. Display::, for additional operating system status information
  387. pertaining to the terminal and the screen.
  388.  
  389. * Menu:
  390.  
  391. * Starting Up::         Customizing XEmacs start-up processing.
  392. * Getting Out::         How exiting works (permanent or temporary).
  393. * System Environment::  Distinguish the name and kind of system.
  394. * User Identification:: Finding the name and user id of the user.
  395. * Time of Day::        Getting the current time.
  396. * Time Conversion::     Converting a time from numeric form to a string, or
  397.                           to calendrical data (or vice versa).
  398. * Timers::        Setting a timer to call a function at a certain time.
  399. * Terminal Input::      Recording terminal input for debugging.
  400. * Terminal Output::     Recording terminal output for debugging.
  401. * Flow Control::        How to turn output flow control on or off.
  402. * Batch Mode::          Running XEmacs without terminal interaction.
  403.  
  404. 
  405. File: lispref.info,  Node: Starting Up,  Next: Getting Out,  Up: System Interface
  406.  
  407. Starting Up XEmacs
  408. ==================
  409.  
  410.    This section describes what XEmacs does when it is started, and how
  411. you can customize these actions.
  412.  
  413. * Menu:
  414.  
  415. * Start-up Summary::        Sequence of actions XEmacs performs at start-up.
  416. * Init File::               Details on reading the init file (`.emacs').
  417. * Terminal-Specific::       How the terminal-specific Lisp file is read.
  418. * Command Line Arguments::  How command line arguments are processed,
  419.                               and how you can customize them.
  420.  
  421. 
  422. File: lispref.info,  Node: Start-up Summary,  Next: Init File,  Up: Starting Up
  423.  
  424. Summary: Sequence of Actions at Start Up
  425. ----------------------------------------
  426.  
  427.    The order of operations performed (in `startup.el') by XEmacs when
  428. it is started up is as follows:
  429.  
  430.   1. It loads the initialization library for the window system, if you
  431.      are using a window system.  This library's name is
  432.      `term/WINDOWSYSTEM-win.el'.
  433.  
  434.   2. It processes the initial options.  (Some of them are handled even
  435.      earlier than this.)
  436.  
  437.   3. It initializes the X window frame and faces, if appropriate.
  438.  
  439.   4. It runs the normal hook `before-init-hook'.
  440.  
  441.   5. It loads the library `site-start', unless the option
  442.      `-no-site-file' was specified.  The library's file name is usually
  443.      `site-start.el'.
  444.  
  445.   6. It loads the file `~/.emacs' unless `-q' was specified on the
  446.      command line.  (This is not done in `-batch' mode.)  The `-u'
  447.      option can specify the user name whose home directory should be
  448.      used instead of `~'.
  449.  
  450.   7. It loads the library `default' unless `inhibit-default-init' is
  451.      non-`nil'.  (This is not done in `-batch' mode or if `-q' was
  452.      specified on the command line.)  The library's file name is
  453.      usually `default.el'.
  454.  
  455.   8. It runs the normal hook `after-init-hook'.
  456.  
  457.   9. It sets the major mode according to `initial-major-mode', provided
  458.      the buffer `*scratch*' is still current and still in Fundamental
  459.      mode.
  460.  
  461.  10. It loads the terminal-specific Lisp file, if any, except when in
  462.      batch mode or using a window system.
  463.  
  464.  11. It displays the initial echo area message, unless you have
  465.      suppressed that with `inhibit-startup-echo-area-message'.
  466.  
  467.  12. It processes the action arguments from the command line.
  468.  
  469.  13. It runs `term-setup-hook'.
  470.  
  471.  14. It calls `frame-notice-user-settings', which modifies the
  472.      parameters of the selected frame according to whatever the init
  473.      files specify.
  474.  
  475.  15. It runs `window-setup-hook'.  *Note Terminal-Specific::.
  476.  
  477.  16. It displays copyleft, nonwarranty, and basic use information,
  478.      provided there were no remaining command line arguments (a few
  479.      steps above) and the value of `inhibit-startup-message' is `nil'.
  480.  
  481.  - User Option: inhibit-startup-message
  482.      This variable inhibits the initial startup messages (the
  483.      nonwarranty, etc.).  If it is non-`nil', then the messages are not
  484.      printed.
  485.  
  486.      This variable exists so you can set it in your personal init file,
  487.      once you are familiar with the contents of the startup message.
  488.      Do not set this variable in the init file of a new user, or in a
  489.      way that affects more than one user, because that would prevent
  490.      new users from receiving the information they are supposed to see.
  491.  
  492.  - User Option: inhibit-startup-echo-area-message
  493.      This variable controls the display of the startup echo area
  494.      message.  You can suppress the startup echo area message by adding
  495.      text with this form to your `.emacs' file:
  496.  
  497.           (setq inhibit-startup-echo-area-message
  498.                 "YOUR-LOGIN-NAME")
  499.  
  500.      Simply setting `inhibit-startup-echo-area-message' to your login
  501.      name is not sufficient to inhibit the message; Emacs explicitly
  502.      checks whether `.emacs' contains an expression as shown above.
  503.      Your login name must appear in the expression as a Lisp string
  504.      constant.
  505.  
  506.      This way, you can easily inhibit the message for yourself if you
  507.      wish, but thoughtless copying of your `.emacs' file will not
  508.      inhibit the message for someone else.
  509.  
  510. 
  511. File: lispref.info,  Node: Init File,  Next: Terminal-Specific,  Prev: Start-up Summary,  Up: Starting Up
  512.  
  513. The Init File: `.emacs'
  514. -----------------------
  515.  
  516.    When you start XEmacs, it normally attempts to load the file
  517. `.emacs' from your home directory.  This file, if it exists, must
  518. contain Lisp code.  It is called your "init file".  The command line
  519. switches `-q' and `-u' affect the use of the init file; `-q' says not
  520. to load an init file, and `-u' says to load a specified user's init
  521. file instead of yours.  *Note Entering XEmacs: (emacs)Entering XEmacs.
  522.  
  523.    A site may have a "default init file", which is the library named
  524. `default.el'.  XEmacs finds the `default.el' file through the standard
  525. search path for libraries (*note How Programs Do Loading::.).  The
  526. XEmacs distribution does not come with this file; sites may provide one
  527. for local customizations.  If the default init file exists, it is
  528. loaded whenever you start Emacs, except in batch mode or if `-q' is
  529. specified.  But your own personal init file, if any, is loaded first; if
  530. it sets `inhibit-default-init' to a non-`nil' value, then XEmacs does
  531. not subsequently load the `default.el' file.
  532.  
  533.    Another file for site-customization is `site-start.el'.  Emacs loads
  534. this *before* the user's init file.  You can inhibit the loading of
  535. this file with the option `-no-site-file'.
  536.  
  537.  - Variable: site-run-file
  538.      This variable specifies the site-customization file to load before
  539.      the user's init file.  Its normal value is `"site-start"'.
  540.  
  541.    If there is a great deal of code in your `.emacs' file, you should
  542. move it into another file named `SOMETHING.el', byte-compile it (*note
  543. Byte Compilation::.), and make your `.emacs' file load the other file
  544. using `load' (*note Loading::.).
  545.  
  546.    *Note Init File Examples: (emacs)Init File Examples, for examples of
  547. how to make various commonly desired customizations in your `.emacs'
  548. file.
  549.  
  550.  - User Option: inhibit-default-init
  551.      This variable prevents XEmacs from loading the default
  552.      initialization library file for your session of XEmacs.  If its
  553.      value is non-`nil', then the default library is not loaded.  The
  554.      default value is `nil'.
  555.  
  556.  - Variable: before-init-hook
  557.  - Variable: after-init-hook
  558.      These two normal hooks are run just before, and just after,
  559.      loading of the user's init file, `default.el', and/or
  560.      `site-start.el'.
  561.  
  562. 
  563. File: lispref.info,  Node: Terminal-Specific,  Next: Command Line Arguments,  Prev: Init File,  Up: Starting Up
  564.  
  565. Terminal-Specific Initialization
  566. --------------------------------
  567.  
  568.    Each terminal type can have its own Lisp library that XEmacs loads
  569. when run on that type of terminal.  For a terminal type named TERMTYPE,
  570. the library is called `term/TERMTYPE'.  XEmacs finds the file by
  571. searching the `load-path' directories as it does for other files, and
  572. trying the `.elc' and `.el' suffixes.  Normally, terminal-specific Lisp
  573. library is located in `emacs/lisp/term', a subdirectory of the
  574. `emacs/lisp' directory in which most XEmacs Lisp libraries are kept.
  575.  
  576.    The library's name is constructed by concatenating the value of the
  577. variable `term-file-prefix' and the terminal type.  Normally,
  578. `term-file-prefix' has the value `"term/"'; changing this is not
  579. recommended.
  580.  
  581.    The usual function of a terminal-specific library is to enable
  582. special keys to send sequences that XEmacs can recognize.  It may also
  583. need to set or add to `function-key-map' if the Termcap entry does not
  584. specify all the terminal's function keys.  *Note Terminal Input::.
  585.  
  586.    When the name of the terminal type contains a hyphen, only the part
  587. of the name before the first hyphen is significant in choosing the
  588. library name.  Thus, terminal types `aaa-48' and `aaa-30-rv' both use
  589. the `term/aaa' library.  If necessary, the library can evaluate
  590. `(getenv "TERM")' to find the full name of the terminal type.
  591.  
  592.    Your `.emacs' file can prevent the loading of the terminal-specific
  593. library by setting the variable `term-file-prefix' to `nil'.  This
  594. feature is useful when experimenting with your own peculiar
  595. customizations.
  596.  
  597.    You can also arrange to override some of the actions of the
  598. terminal-specific library by setting the variable `term-setup-hook'.
  599. This is a normal hook which XEmacs runs using `run-hooks' at the end of
  600. XEmacs initialization, after loading both your `.emacs' file and any
  601. terminal-specific libraries.  You can use this variable to define
  602. initializations for terminals that do not have their own libraries.
  603. *Note Hooks::.
  604.  
  605.  - Variable: term-file-prefix
  606.      If the `term-file-prefix' variable is non-`nil', XEmacs loads a
  607.      terminal-specific initialization file as follows:
  608.  
  609.           (load (concat term-file-prefix (getenv "TERM")))
  610.  
  611.      You may set the `term-file-prefix' variable to `nil' in your
  612.      `.emacs' file if you do not wish to load the
  613.      terminal-initialization file.  To do this, put the following in
  614.      your `.emacs' file: `(setq term-file-prefix nil)'.
  615.  
  616.  - Variable: term-setup-hook
  617.      This variable is a normal hook that XEmacs runs after loading your
  618.      `.emacs' file, the default initialization file (if any) and the
  619.      terminal-specific Lisp file.
  620.  
  621.      You can use `term-setup-hook' to override the definitions made by a
  622.      terminal-specific file.
  623.  
  624.  - Variable: window-setup-hook
  625.      This variable is a normal hook which XEmacs runs after loading your
  626.      `.emacs' file and the default initialization file (if any), after
  627.      loading terminal-specific Lisp code, and after running the hook
  628.      `term-setup-hook'.
  629.  
  630. 
  631. File: lispref.info,  Node: Command Line Arguments,  Prev: Terminal-Specific,  Up: Starting Up
  632.  
  633. Command Line Arguments
  634. ----------------------
  635.  
  636.    You can use command line arguments to request various actions when
  637. you start XEmacs.  Since you do not need to start XEmacs more than once
  638. per day, and will often leave your XEmacs session running longer than
  639. that, command line arguments are hardly ever used.  As a practical
  640. matter, it is best to avoid making the habit of using them, since this
  641. habit would encourage you to kill and restart XEmacs unnecessarily
  642. often.  These options exist for two reasons: to be compatible with
  643. other editors (for invocation by other programs) and to enable shell
  644. scripts to run specific Lisp programs.
  645.  
  646.    This section describes how Emacs processes command line arguments,
  647. and how you can customize them.
  648.  
  649.  - Function: command-line
  650.      This function parses the command line that XEmacs was called with,
  651.      processes it, loads the user's `.emacs' file and displays the
  652.      startup messages.
  653.  
  654.  - Variable: command-line-processed
  655.      The value of this variable is `t' once the command line has been
  656.      processed.
  657.  
  658.      If you redump XEmacs by calling `dump-emacs', you may wish to set
  659.      this variable to `nil' first in order to cause the new dumped
  660.      XEmacs to process its new command line arguments.
  661.  
  662.  - Variable: command-switch-alist
  663.      The value of this variable is an alist of user-defined command-line
  664.      options and associated handler functions.  This variable exists so
  665.      you can add elements to it.
  666.  
  667.      A "command line option" is an argument on the command line of the
  668.      form:
  669.  
  670.           -OPTION
  671.  
  672.      The elements of the `command-switch-alist' look like this:
  673.  
  674.           (OPTION . HANDLER-FUNCTION)
  675.  
  676.      The HANDLER-FUNCTION is called to handle OPTION and receives the
  677.      option name as its sole argument.
  678.  
  679.      In some cases, the option is followed in the command line by an
  680.      argument.  In these cases, the HANDLER-FUNCTION can find all the
  681.      remaining command-line arguments in the variable
  682.      `command-line-args-left'.  (The entire list of command-line
  683.      arguments is in `command-line-args'.)
  684.  
  685.      The command line arguments are parsed by the `command-line-1'
  686.      function in the `startup.el' file.  See also *Note Command Line
  687.      Switches and Arguments: (emacs)Command Switches.
  688.  
  689.  - Variable: command-line-args
  690.      The value of this variable is the list of command line arguments
  691.      passed to XEmacs.
  692.  
  693.  - Variable: command-line-functions
  694.      This variable's value is a list of functions for handling an
  695.      unrecognized command-line argument.  Each time the next argument
  696.      to be processed has no special meaning, the functions in this list
  697.      are called, in order of appearance, until one of them returns a
  698.      non-`nil' value.
  699.  
  700.      These functions are called with no arguments.  They can access the
  701.      command-line argument under consideration through the variable
  702.      `argi'.  The remaining arguments (not including the current one)
  703.      are in the variable `command-line-args-left'.
  704.  
  705.      When a function recognizes and processes the argument in `argi', it
  706.      should return a non-`nil' value to say it has dealt with that
  707.      argument.  If it has also dealt with some of the following
  708.      arguments, it can indicate that by deleting them from
  709.      `command-line-args-left'.
  710.  
  711.      If all of these functions return `nil', then the argument is used
  712.      as a file name to visit.
  713.  
  714. 
  715. File: lispref.info,  Node: Getting Out,  Next: System Environment,  Prev: Starting Up,  Up: System Interface
  716.  
  717. Getting out of XEmacs
  718. =====================
  719.  
  720.    There are two ways to get out of XEmacs: you can kill the XEmacs job,
  721. which exits permanently, or you can suspend it, which permits you to
  722. reenter the XEmacs process later.  As a practical matter, you seldom
  723. kill XEmacs--only when you are about to log out.  Suspending is much
  724. more common.
  725.  
  726. * Menu:
  727.  
  728. * Killing XEmacs::        Exiting XEmacs irreversibly.
  729. * Suspending XEmacs::     Exiting XEmacs reversibly.
  730.  
  731. 
  732. File: lispref.info,  Node: Killing XEmacs,  Next: Suspending XEmacs,  Up: Getting Out
  733.  
  734. Killing XEmacs
  735. --------------
  736.  
  737.    Killing XEmacs means ending the execution of the XEmacs process.  The
  738. parent process normally resumes control.  The low-level primitive for
  739. killing XEmacs is `kill-emacs'.
  740.  
  741.  - Function: kill-emacs &optional EXIT-DATA
  742.      This function exits the XEmacs process and kills it.
  743.  
  744.      If EXIT-DATA is an integer, then it is used as the exit status of
  745.      the XEmacs process.  (This is useful primarily in batch operation;
  746.      see *Note Batch Mode::.)
  747.  
  748.      If EXIT-DATA is a string, its contents are stuffed into the
  749.      terminal input buffer so that the shell (or whatever program next
  750.      reads input) can read them.
  751.  
  752.    All the information in the XEmacs process, aside from files that have
  753. been saved, is lost when the XEmacs is killed.  Because killing XEmacs
  754. inadvertently can lose a lot of work, XEmacs queries for confirmation
  755. before actually terminating if you have buffers that need saving or
  756. subprocesses that are running.  This is done in the function
  757. `save-buffers-kill-emacs'.
  758.  
  759.  - Variable: kill-emacs-query-functions
  760.      After asking the standard questions, `save-buffers-kill-emacs'
  761.      calls the functions in the list `kill-buffer-query-functions', in
  762.      order of appearance, with no arguments.  These functions can ask
  763.      for additional confirmation from the user.  If any of them returns
  764.      non-`nil', XEmacs is not killed.
  765.  
  766.  - Variable: kill-emacs-hook
  767.      This variable is a normal hook; once `save-buffers-kill-emacs' is
  768.      finished with all file saving and confirmation, it runs the
  769.      functions in this hook.
  770.  
  771. 
  772. File: lispref.info,  Node: Suspending XEmacs,  Prev: Killing XEmacs,  Up: Getting Out
  773.  
  774. Suspending XEmacs
  775. -----------------
  776.  
  777.    "Suspending XEmacs" means stopping XEmacs temporarily and returning
  778. control to its superior process, which is usually the shell.  This
  779. allows you to resume editing later in the same XEmacs process, with the
  780. same buffers, the same kill ring, the same undo history, and so on.  To
  781. resume XEmacs, use the appropriate command in the parent shell--most
  782. likely `fg'.
  783.  
  784.    Some operating systems do not support suspension of jobs; on these
  785. systems, "suspension" actually creates a new shell temporarily as a
  786. subprocess of XEmacs.  Then you would exit the shell to return to
  787. XEmacs.
  788.  
  789.    Suspension is not useful with window systems such as X, because the
  790. XEmacs job may not have a parent that can resume it again, and in any
  791. case you can give input to some other job such as a shell merely by
  792. moving to a different window.  Therefore, suspending is not allowed
  793. when XEmacs is an X client.
  794.  
  795.  - Function: suspend-emacs STRING
  796.      This function stops XEmacs and returns control to the superior
  797.      process.  If and when the superior process resumes XEmacs,
  798.      `suspend-emacs' returns `nil' to its caller in Lisp.
  799.  
  800.      If STRING is non-`nil', its characters are sent to be read as
  801.      terminal input by XEmacs's superior shell.  The characters in
  802.      STRING are not echoed by the superior shell; only the results
  803.      appear.
  804.  
  805.      Before suspending, `suspend-emacs' runs the normal hook
  806.      `suspend-hook'.  In Emacs version 18, `suspend-hook' was not a
  807.      normal hook; its value was a single function, and if its value was
  808.      non-`nil', then `suspend-emacs' returned immediately without
  809.      actually suspending anything.
  810.  
  811.      After the user resumes XEmacs, `suspend-emacs' runs the normal hook
  812.      `suspend-resume-hook'.  *Note Hooks::.
  813.  
  814.      The next redisplay after resumption will redraw the entire screen,
  815.      unless the variable `no-redraw-on-reenter' is non-`nil' (*note
  816.      Refresh Screen::.).
  817.  
  818.      In the following example, note that `pwd' is not echoed after
  819.      XEmacs is suspended.  But it is read and executed by the shell.
  820.  
  821.           (suspend-emacs)
  822.                => nil
  823.  
  824.           (add-hook 'suspend-hook
  825.                     (function (lambda ()
  826.                                 (or (y-or-n-p
  827.                                       "Really suspend? ")
  828.                                     (error "Suspend cancelled")))))
  829.                => (lambda nil
  830.                     (or (y-or-n-p "Really suspend? ")
  831.                         (error "Suspend cancelled")))
  832.  
  833.           (add-hook 'suspend-resume-hook
  834.                     (function (lambda () (message "Resumed!"))))
  835.                => (lambda nil (message "Resumed!"))
  836.  
  837.           (suspend-emacs "pwd")
  838.                => nil
  839.  
  840.           ---------- Buffer: Minibuffer ----------
  841.           Really suspend? y
  842.           ---------- Buffer: Minibuffer ----------
  843.  
  844.           ---------- Parent Shell ----------
  845.           lewis@slug[23] % /user/lewis/manual
  846.           lewis@slug[24] % fg
  847.  
  848.           ---------- Echo Area ----------
  849.           Resumed!
  850.  
  851.  - Variable: suspend-hook
  852.      This variable is a normal hook run before suspending.
  853.  
  854.  - Variable: suspend-resume-hook
  855.      This variable is a normal hook run after suspending.
  856.  
  857. 
  858. File: lispref.info,  Node: System Environment,  Next: User Identification,  Prev: Getting Out,  Up: System Interface
  859.  
  860. Operating System Environment
  861. ============================
  862.  
  863.    XEmacs provides access to variables in the operating system
  864. environment through various functions.  These variables include the
  865. name of the system, the user's UID, and so on.
  866.  
  867.  - Variable: system-type
  868.      The value of this variable is a symbol indicating the type of
  869.      operating system XEmacs is operating on.  Here is a table of the
  870.      possible values:
  871.  
  872.     `aix-v3'
  873.           AIX.
  874.  
  875.     `berkeley-unix'
  876.           Berkeley BSD.
  877.  
  878.     `dgux'
  879.           Data General DGUX operating system.
  880.  
  881.     `gnu'
  882.           A GNU system using the GNU HURD and Mach.
  883.  
  884.     `hpux'
  885.           Hewlett-Packard HPUX operating system.
  886.  
  887.     `irix'
  888.           Silicon Graphics Irix system.
  889.  
  890.     `linux'
  891.           A GNU system using the Linux kernel.
  892.  
  893.     `ms-dos'
  894.           Microsoft MS-DOS "operating system."
  895.  
  896.     `next-mach'
  897.           NeXT Mach-based system.
  898.  
  899.     `rtu'
  900.           Masscomp RTU, UCB universe.
  901.  
  902.     `unisoft-unix'
  903.           UniSoft UniPlus.
  904.  
  905.     `usg-unix-v'
  906.           AT&T System V.
  907.  
  908.     `vax-vms'
  909.           VAX VMS.
  910.  
  911.     `windows-nt'
  912.           Microsoft windows NT.
  913.  
  914.     `xenix'
  915.           SCO Xenix 386.
  916.  
  917.      We do not wish to add new symbols to make finer distinctions
  918.      unless it is absolutely necessary!  In fact, we hope to eliminate
  919.      some of these alternatives in the future.  We recommend using
  920.      `system-configuration' to distinguish between different operating
  921.      systems.
  922.  
  923.  - Variable: system-configuration
  924.      This variable holds the three-part configuration name for the
  925.      hardware/software configuration of your system, as a string.  The
  926.      convenient way to test parts of this string is with `string-match'.
  927.  
  928.  - Function: system-name
  929.      This function returns the name of the machine you are running on.
  930.           (system-name)
  931.                => "prep.ai.mit.edu"
  932.  
  933.    The symbol `system-name' is a variable as well as a function.  In
  934. fact, the function returns whatever value the variable `system-name'
  935. currently holds.  Thus, you can set the variable `system-name' in case
  936. Emacs is confused about the name of your system.  The variable is also
  937. useful for constructing frame titles (*note Frame Titles::.).
  938.  
  939.  - Variable: mail-host-address
  940.      If this variable is non-`nil', it is used instead of `system-name'
  941.      for purposes of generating email addresses.  For example, it is
  942.      used when constructing the default value of `user-mail-address'.
  943.      *Note User Identification::.  (Since this is done when XEmacs
  944.      starts up, the value actually used is the one saved when XEmacs
  945.      was dumped.  *Note Building XEmacs::.)
  946.  
  947.  - Function: getenv VAR
  948.      This function returns the value of the environment variable VAR,
  949.      as a string.  Within XEmacs, the environment variable values are
  950.      kept in the Lisp variable `process-environment'.
  951.  
  952.           (getenv "USER")
  953.                => "lewis"
  954.           
  955.           lewis@slug[10] % printenv
  956.           PATH=.:/user/lewis/bin:/usr/bin:/usr/local/bin
  957.           USER=lewis
  958.           TERM=ibmapa16
  959.           SHELL=/bin/csh
  960.           HOME=/user/lewis
  961.  
  962.  - Command: setenv VARIABLE VALUE
  963.      This command sets the value of the environment variable named
  964.      VARIABLE to VALUE.  Both arguments should be strings.  This
  965.      function works by modifying `process-environment'; binding that
  966.      variable with `let' is also reasonable practice.
  967.  
  968.  - Variable: process-environment
  969.      This variable is a list of strings, each describing one environment
  970.      variable.  The functions `getenv' and `setenv' work by means of
  971.      this variable.
  972.  
  973.           process-environment
  974.           => ("l=/usr/stanford/lib/gnuemacs/lisp"
  975.               "PATH=.:/user/lewis/bin:/usr/class:/nfsusr/local/bin"
  976.               "USER=lewis"
  977.  
  978.           "TERM=ibmapa16"
  979.               "SHELL=/bin/csh"
  980.               "HOME=/user/lewis")
  981.  
  982.  - Variable: path-separator
  983.      This variable holds a string which says which character separates
  984.      directories in a search path (as found in an environment
  985.      variable).  Its value is `":"' for Unix and GNU systems, and `";"'
  986.      for MS-DOS and Windows NT.
  987.  
  988.  - Variable: invocation-name
  989.      This variable holds the program name under which Emacs was
  990.      invoked.  The value is a string, and does not include a directory
  991.      name.
  992.  
  993.  - Variable: invocation-directory
  994.      This variable holds the directory from which the Emacs executable
  995.      was invoked, or perhaps `nil' if that directory cannot be
  996.      determined.
  997.  
  998.  - Variable: installation-directory
  999.      If non-`nil', this is a directory within which to look for the
  1000.      `lib-src' and `etc' subdirectories.  This is non-`nil' when Emacs
  1001.      can't find those directories in their standard installed
  1002.      locations, but can find them in a directory related somehow to the
  1003.      one containing the Emacs executable.
  1004.  
  1005.  - Function: load-average
  1006.      This function returns the current 1-minute, 5-minute and 15-minute
  1007.      load averages in a list.  The values are integers that are 100
  1008.      times the system load averages.  (The load averages indicate the
  1009.      number of processes trying to run.)
  1010.  
  1011.           (load-average)
  1012.                => (169 48 36)
  1013.           
  1014.           lewis@rocky[5] % uptime
  1015.            11:55am  up 1 day, 19:37,  3 users,
  1016.            load average: 1.69, 0.48, 0.36
  1017.  
  1018.  - Function: emacs-pid
  1019.      This function returns the process ID of the Emacs process.
  1020.  
  1021.  - Function: setprv PRIVILEGE-NAME &optional SETP GETPRV
  1022.      This function sets or resets a VMS privilege.  (It does not exist
  1023.      on Unix.)  The first arg is the privilege name, as a string.  The
  1024.      second argument, SETP, is `t' or `nil', indicating whether the
  1025.      privilege is to be turned on or off.  Its default is `nil'.  The
  1026.      function returns `t' if successful, `nil' otherwise.
  1027.  
  1028.      If the third argument, GETPRV, is non-`nil', `setprv' does not
  1029.      change the privilege, but returns `t' or `nil' indicating whether
  1030.      the privilege is currently enabled.
  1031.  
  1032. 
  1033. File: lispref.info,  Node: User Identification,  Next: Time of Day,  Prev: System Environment,  Up: System Interface
  1034.  
  1035. User Identification
  1036. ===================
  1037.  
  1038.  - Variable: user-mail-address
  1039.      This holds the nominal email address of the user who is using
  1040.      Emacs.  When Emacs starts up, it computes a default value that is
  1041.      usually right, but users often set this themselves when the
  1042.      default value is not right.
  1043.  
  1044.  - Function: user-login-name &optional UID
  1045.      If you don't specify UID, this function returns the name under
  1046.      which the user is logged in.  If the environment variable `LOGNAME'
  1047.      is set, that value is used.  Otherwise, if the environment variable
  1048.      `USER' is set, that value is used.  Otherwise, the value is based
  1049.      on the effective UID, not the real UID.
  1050.  
  1051.      If you specify UID, the value is the user name that corresponds to
  1052.      UID (which should be an integer).
  1053.  
  1054.           (user-login-name)
  1055.                => "lewis"
  1056.  
  1057.  - Function: user-real-login-name
  1058.      This function returns the user name corresponding to Emacs's real
  1059.      UID.  This ignores the effective UID and ignores the environment
  1060.      variables `LOGNAME' and `USER'.
  1061.  
  1062.  - Function: user-full-name
  1063.      This function returns the full name of the user.
  1064.  
  1065.           (user-full-name)
  1066.                => "Bil Lewis"
  1067.  
  1068.    The symbols `user-login-name', `user-real-login-name' and
  1069. `user-full-name' are variables as well as functions.  The functions
  1070. return the same values that the variables hold.  These variables allow
  1071. you to "fake out" Emacs by telling the functions what to return.  The
  1072. variables are also useful for constructing frame titles (*note Frame
  1073. Titles::.).
  1074.  
  1075.  - Function: user-real-uid
  1076.      This function returns the real UID of the user.
  1077.  
  1078.           (user-real-uid)
  1079.                => 19
  1080.  
  1081.  - Function: user-uid
  1082.      This function returns the effective UID of the user.
  1083.  
  1084. 
  1085. File: lispref.info,  Node: Time of Day,  Next: Time Conversion,  Prev: User Identification,  Up: System Interface
  1086.  
  1087. Time of Day
  1088. ===========
  1089.  
  1090.    This section explains how to determine the current time and the time
  1091. zone.
  1092.  
  1093.  - Function: current-time-string &optional TIME-VALUE
  1094.      This function returns the current time and date as a
  1095.      humanly-readable string.  The format of the string is unvarying;
  1096.      the number of characters used for each part is always the same, so
  1097.      you can reliably use `substring' to extract pieces of it.  It is
  1098.      wise to count the characters from the beginning of the string
  1099.      rather than from the end, as additional information may be added
  1100.      at the end.
  1101.  
  1102.      The argument TIME-VALUE, if given, specifies a time to format
  1103.      instead of the current time.  The argument should be a list whose
  1104.      first two elements are integers.  Thus, you can use times obtained
  1105.      from `current-time' (see below) and from `file-attributes' (*note
  1106.      File Attributes::.).
  1107.  
  1108.           (current-time-string)
  1109.                => "Wed Oct 14 22:21:05 1987"
  1110.  
  1111.  - Function: current-time
  1112.      This function returns the system's time value as a list of three
  1113.      integers: `(HIGH LOW MICROSEC)'.  The integers HIGH and LOW
  1114.      combine to give the number of seconds since 0:00 January 1, 1970,
  1115.      which is HIGH * 2**16 + LOW.
  1116.  
  1117.      The third element, MICROSEC, gives the microseconds since the
  1118.      start of the current second (or 0 for systems that return time
  1119.      only on the resolution of a second).
  1120.  
  1121.      The first two elements can be compared with file time values such
  1122.      as you get with the function `file-attributes'.  *Note File
  1123.      Attributes::.
  1124.  
  1125.  - Function: current-time-zone &optional TIME-VALUE
  1126.      This function returns a list describing the time zone that the
  1127.      user is in.
  1128.  
  1129.      The value has the form `(OFFSET NAME)'.  Here OFFSET is an integer
  1130.      giving the number of seconds ahead of UTC (east of Greenwich).  A
  1131.      negative value means west of Greenwich.  The second element, NAME
  1132.      is a string giving the name of the time zone.  Both elements
  1133.      change when daylight savings time begins or ends; if the user has
  1134.      specified a time zone that does not use a seasonal time
  1135.      adjustment, then the value is constant through time.
  1136.  
  1137.      If the operating system doesn't supply all the information
  1138.      necessary to compute the value, both elements of the list are
  1139.      `nil'.
  1140.  
  1141.      The argument TIME-VALUE, if given, specifies a time to analyze
  1142.      instead of the current time.  The argument should be a cons cell
  1143.      containing two integers, or a list whose first two elements are
  1144.      integers.  Thus, you can use times obtained from `current-time'
  1145.      (see above) and from `file-attributes' (*note File Attributes::.).
  1146.  
  1147.